from sqlalchemy import String, Column, BigInteger, DateTime,Integer
from config.database import Base


class Rag(Base):
    """
    知识库信息表
    """

    __tablename__ = 'bjj_rag'

    id = Column(BigInteger, primary_key=True, nullable=False, comment='知识库id')
    rag_title = Column(String(255), nullable=True, comment='知识库名称')
    user_id = Column(BigInteger, nullable=True, comment='创建用户id')
    sumary = Column(String(255), nullable=True, comment='知识库摘要')
    status = Column(String(11), nullable=True, comment='知识库状态')
    create_time = Column(DateTime, nullable=True, comment='创建时间')
    create_by = Column(String(64), nullable=True, comment='创建人')
    update_time = Column(DateTime, nullable=True, comment='更新时间')
    update_by = Column(String(64), nullable=True, comment='更新人')

class SysUserRag(Base):
    """
    用户与岗位关联表
    """

    __tablename__ = 'sys_user_rag'

    user_id = Column(Integer, primary_key=True, nullable=False, comment='用户ID')
    id = Column(BigInteger, primary_key=True, nullable=False, comment='知识库id')


